package com.graduate.framework.context;

import com.graduate.framework.entity.User;

/**
 * @author: 本郡主是喵
 * @date: 2025-03-05 10:22
 **/
public class UserContext
{
    private static ThreadLocal<User> userThreadLocal = new ThreadLocal<>();

    public static void setUser(User user)
    {
        userThreadLocal.set(user);
    }

    public static User getUser()
    {
        return userThreadLocal.get();
    }
}
